Skip to content

fix(precompile): jsx child expression string literal not escaped#304

Merged
marvinhagemeister merged 1 commit intomainfrom
precompiile-escape-jsx-child-lit
May 7, 2025
Merged

fix(precompile): jsx child expression string literal not escaped#304
marvinhagemeister merged 1 commit intomainfrom
precompiile-escape-jsx-child-lit

Conversation

@marvinhagemeister
Copy link
Contributor

Noticed that we weren't escaping string literals when passed inside an expression as children.

<div>{"\"a&>'"}</div>

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marvinhagemeister marvinhagemeister merged commit 49f1af8 into main May 7, 2025
2 checks passed
marvinhagemeister added a commit to denoland/deno that referenced this pull request May 7, 2025
Fixes denoland/deno_ast#304 .

This only affects actual string literals in the source code inside a JSX
expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants